package com.chenfan.ccp.plug.mybatis.mapper;



import com.chenfan.ccp.plug.mybatis.util.MybatisPlusBuild;
import com.chenfan.ccp.plug.mybatis.util.MybatisPlus;

import java.util.List;

public class BaseMapper<T> {


	public int update(MybatisPlusBuild build) {

		return MybatisPlus.getInstance().update(this, build);
	}

	public T findOne(MybatisPlusBuild build) {
		return MybatisPlus.getInstance().findOne((T) this, build);
	}


	public List<T> findAll(MybatisPlusBuild build) {
		return MybatisPlus.getInstance().findAll((T) this, build);
	}

	public int save() {

		return MybatisPlus.getInstance().save(this);

	}

	public MybatisPlusBuild build() {
		return new MybatisPlusBuild(this.getClass());
	}


	public int delete(MybatisPlusBuild build) {
		return MybatisPlus.getInstance().delete(build);
	}


}
